package com.heima.client;

import com.heima.pojo.User;
import org.springframework.stereotype.Component;

@Component
//服务降级处理类
public class UserClientFallback implements UserClient
{

    @Override
    public User queryById(Long id)
    {
        User user=new User();
        user.setId(id);
        user.setName("用户异常");
        return user;
    }
}
